﻿using System;
using SharpSqlAnalyzer.nodes;

namespace SharpSqlAnalyzer.stmt.redshift
{
	// Token: 0x0200010C RID: 268
	public class TRedshiftCreateSchema : TCustomSqlStatement
	{
		// Token: 0x1700018C RID: 396
		// (get) Token: 0x060008CC RID: 2252 RVA: 0x0030280A File Offset: 0x00300A0A
		// (set) Token: 0x060008CD RID: 2253 RVA: 0x00302812 File Offset: 0x00300A12
		public virtual TObjectName SchemaName
		{
			get
			{
				return this.schemaName;
			}
			set
			{
				this.schemaName = value;
			}
		}

		// Token: 0x1700018D RID: 397
		// (get) Token: 0x060008CE RID: 2254 RVA: 0x0030281B File Offset: 0x00300A1B
		// (set) Token: 0x060008CF RID: 2255 RVA: 0x00302823 File Offset: 0x00300A23
		public virtual TObjectName UserName
		{
			get
			{
				return this.userName;
			}
			set
			{
				this.userName = value;
			}
		}

		// Token: 0x060008D0 RID: 2256 RVA: 0x0030282C File Offset: 0x00300A2C
		public TRedshiftCreateSchema(EDbVendor dbvendor) : base(dbvendor)
		{
			this.sqlstatementtype = ESqlStatementType.sstredshiftCreateSchema;
		}

		// Token: 0x060008D1 RID: 2257 RVA: 0x00302840 File Offset: 0x00300A40
		public override int doParseStatement(TCustomSqlStatement psql)
		{
			if (this.rootNode == null)
			{
				return -1;
			}
			base.doParseStatement(psql);
			TDummy tdummy = (TDummy)this.rootNode;
			if (((TDummy)this.rootNode).node1 != null)
			{
				this.schemaName = (TObjectName)((TDummy)this.rootNode).node1;
			}
			if (((TDummy)this.rootNode).node2 != null)
			{
				this.userName = (TObjectName)((TDummy)this.rootNode).node2;
			}
			return 0;
		}

		// Token: 0x060008D2 RID: 2258 RVA: 0x003028C6 File Offset: 0x00300AC6
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x060008D3 RID: 2259 RVA: 0x003028D6 File Offset: 0x00300AD6
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x0400122C RID: 4652
		private TObjectName schemaName;

		// Token: 0x0400122D RID: 4653
		private TObjectName userName;
	}
}
